<template>
  <a-layout id="components-layout-demo-top">
    <a-layout-header> <Header /></a-layout-header>

    <a-layout-content style="margin: 0 16px">
      <a-breadcrumb style="margin: 16px 0">
        <a-breadcrumb-item v-for="(item, idx) in currentPath" :key="idx">{{
          pathObj[item]
        }}</a-breadcrumb-item>
      </a-breadcrumb>
      <a-card>
        <router-view />
        <div class="backHome" @click="backHome">
          <span><a-icon type="home" /></span>
        </div>
      </a-card>
    </a-layout-content>
    <a-layout-footer style="text-align: center">
      Blog Manage 2022 Created by 大白
    </a-layout-footer>
  </a-layout>
</template>

<script>
import Header from "@/components/admin/Header.vue";
export default {
  components: { Header },
  data() {
    return {
      pathObj: {
        home: "后台首页",
        adminUsers: "用户管理",
        article: "文章",
        website: "网站管理",
        articleAdd: "添加文章",
        articleList: "文章列表",
        articleCategory: "分类管理",
        articleComment: "评论管理",
        notice: "公告信息",
        carousel: "轮播图",
        aside: "侧边栏配置",
      },
      currentPath: ["home"],
    };
  },
  methods: {
    backHome() {
      this.$router.push("/client");
    },
  },
};
</script>

<style>
#components-layout-demo-top .logo {
  width: 120px;
  height: 31px;
  background: rgba(255, 255, 255, 0.2);
  margin: 16px 24px 16px 0;
  float: left;
}
.backHome {
  position: fixed;
  background-color: #6589ff;
  height: 40px;
  width: 40px;
  line-height: 40px;
  border-radius: 3px;
  color: #fff;
  text-align: center;
  font-size: 15px;
  bottom: 50px;
  cursor: pointer;
  right: 60px;
}
</style>
